import request from '@/config/axios'

export interface Model {
  id: string
  accessToken: string
  refreshToken: string
  userId: string
  userType: number
  clientId: string
  createTime: Date
  expiresTime: Date
}

// 查询 token列表
export const getPage = (params: PageParam) => {
  return request.get({ url: import.meta.env.VITE_BASE_ROLE + '/userCenter/auth/oauth2/token/page.json', params })
}

// 删除 token
export const del = (accessToken: number) => {
  return request.delete({
    url: import.meta.env.VITE_BASE_ROLE + '/userCenter/auth/oauth2/token/delete?accessToken=' + accessToken
  })
}
